home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Prog / T / Think-Pascal-7.0.cpt / THINK Pascal Interfaces / OSUtils.p < prev    next >
Encoding:
Text File  |  1991-04-05  |  2.3 KB  |  97 lines  |  [TEXT/PJMM]

  1. {    This file has been processed by The THINK Pascal Source Converter, v1.1.    }
  2.  
  3. {}
  4. {Created: Sunday, January 6, 1991 at 10:51 PM}
  5. {    OSUtils.p}
  6. {    Pascal Interface to the Macintosh Libraries}
  7. {}
  8. {        Copyright Apple Computer, Inc.    1985-1990}
  9. {        All rights reserved}
  10. {}
  11.  
  12.  
  13. {    RMS    4/3/91        Modified to exclude declarations already in the THINK Pascal built-in interfaces    }
  14. {   MGC    4/5/91        Removed more declarations already in the THINK Pascal built-in interfaces}
  15.  
  16.  
  17.  
  18. unit OSUtils;
  19. interface
  20.     uses
  21.         Types;
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.     const
  36. {*** Environs Equates ***}
  37.         curSysEnvVers = 2;                  {Updated to equal latest SysEnvirons version}
  38.  
  39. { Machine Types }
  40.         envMacIIcx = 6;
  41.         envSE30 = 7;
  42.         envPortable = 8;
  43.         envMacIIci = 9;
  44.         envMacIIfx = 11;
  45.  
  46. { CPU types }
  47.         env68040 = 5;
  48.  
  49. { Keyboard types }
  50.         envPrtblADBKbd = 6;
  51.         envPrtblISOKbd = 7;
  52.         envStdISOADBKbd = 8;
  53.         envExtISOADBKbd = 9;
  54.  
  55.     type
  56.         QTypes = (dummyType, vType, ioQType, drvQType, evType, fsQType, sIQType, dtQType);
  57.  
  58.         ParamBlkType = (IOParam, FileParam, VolumeParam, CntrlParam, SlotDevParam, MultiDevParam, AccessParam, ObjParam, CopyParam, WDParam, FIDParam, CSParam, ForeignPrivParam);
  59.  
  60.         DeferredTask = record
  61.                 qLink: QElemPtr;                {next queue entry}
  62.                 qType: INTEGER;                 {queue type}
  63.                 dtFlags: INTEGER;               {reserved}
  64.                 dtAddr: ProcPtr;                {pointer to task}
  65.                 dtParm: LONGINT;                {optional parameter}
  66.                 dtReserved: LONGINT;            {reserved--should be 0}
  67.             end;
  68.  
  69.     function GetOSTrapAddress (trapNum: INTEGER): LONGINT;
  70.     procedure SetOSTrapAddress (trapAddr: LONGINT;
  71.                                     trapNum: INTEGER);
  72.     function GetToolTrapAddress (trapNum: INTEGER): LONGINT;
  73.     procedure SetToolTrapAddress (trapAddr: LONGINT;
  74.                                     trapNum: INTEGER);
  75.     function GetToolboxTrapAddress (trapNum: INTEGER): LONGINT;
  76.     procedure SetToolboxTrapAddress (trapAddr: LONGINT;
  77.                                     trapNum: INTEGER);
  78.  
  79.     function SetCurrentA5: LONGINT;
  80.     inline
  81.         $2E8D, $2A78, $0904;
  82.     function SetA5 (newA5: LONGINT): LONGINT;
  83.     inline
  84.         $2F4D, $0004, $2A5F;
  85.  
  86.     function InitUtil: OSErr;
  87.     inline
  88.         $A03F, $3E80;
  89.  
  90.     function SwapInstructionCache (cacheEnable: BOOLEAN): BOOLEAN;
  91.     procedure FlushInstructionCache;
  92.     function SwapDataCache (cacheEnable: BOOLEAN): BOOLEAN;
  93.     procedure FlushDataCache;
  94.  
  95. implementation
  96. end.
  97.